Get All Posts
The endpoint is used to get all the generated posts.
Request URL
- GET https://brain.predis.ai/predis_api/v1/get_posts/
Request Payload
Name | Description | Type | Default Value | Possible Values | Required |
---|---|---|---|---|---|
brand_id | Unique Identifier of your Brand. You can learn more about locating your Brand ID by visiting the link provided here. | String | None | YOUR_BRAND_ID | Yes |
media_type | Provide this information only when you want posts of a specific media_type | String | single_image | single_image , carousel , video | No |
page_n | The number of page that you want results for. | Integer | 1 | Any Integer greater than 0 | No |
items_n | The number of items per page that you need. | Integer | 10 | Any Integer greater than 0. Maximum value is 20. If this value is set to be greater than 20, 20 items will be returned. | No |
Sample Success Response
{
"posts": [
{
"post_id": "...",
"urls": ["..."],
"caption": "...",
"media_type": "..."
}
],
"total_pages": 5,
"errors": []
}
Sample Error Response
{
"errors": [{
"detail": "...",
"solution": "..."
}]
}
Response Codes
HTTP Status Code | Error Code | User Message | Recommended solution |
---|---|---|---|
429 | 001 | Maximum number of requests reached | Maximum number of hourly requests reached You have been rate-limited. Wait for sometime and try again |
400 | 002 | Invalid brand_id provided | You have provided an invalid brand_id . Please provide a valid brand_id and try again. Read more here |
Rate Limiting
Standard API rate limits apply to this endpoint. Read more about the rate limits here